package cn.tedu.review;

import java.io.*;

public class CreateStream {
    public static void main(String[] args) {
        f1();
        f2();
    }

    private static void f2() {

        try {
            Reader in =new FileReader("D:\\ready\\1.txt");
            Reader in2=new FileReader(new File("D:\\ready\\1.txt"));
            BufferedReader in3=new BufferedReader(new FileReader(new File("D:\\ready\\1.txt")));
            BufferedReader in4=new BufferedReader(new FileReader("D:\\ready\\1.txt"));

            FileWriter out1=new FileWriter(new File(""));
            FileWriter out2=new FileWriter(new File(""),true);
            FileWriter out3=new FileWriter("");
            FileWriter out4=new FileWriter("",true);
            BufferedWriter out5=new BufferedWriter(new FileWriter(new File("")));
            BufferedWriter out6=new BufferedWriter(new FileWriter(new File(""),true));
            BufferedWriter out7=new BufferedWriter(new FileWriter(""));
            BufferedWriter out8=new BufferedWriter(new FileWriter("",true));

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static void f1() {
        InputStream in=null;
        OutputStream out=null;
        try {
            in=new FileInputStream(new File("D:\\ready\\1.txt"));
            FileInputStream in1=new FileInputStream(new File("D:\\ready\\1.txt"));
            FileInputStream in2=new FileInputStream(new File("D:\\ready\\1.txt"));
            BufferedInputStream in3=new BufferedInputStream(new FileInputStream(new File("D:\\ready\\1.txt")));
            BufferedInputStream in4=new BufferedInputStream(new FileInputStream("D:\\ready\\1.txt"));


            out=new FileOutputStream(new File("D:\\ready\\1.txt"));
            out=new FileOutputStream("D:\\ready\\1.txt");
            FileOutputStream out1=new FileOutputStream(new File("D:\\ready\\1.txt"));
            FileOutputStream out2=new FileOutputStream(new File("D:\\ready\\1.txt"),true);
            FileOutputStream out3=new FileOutputStream("D:\\ready\\1.txt");
            FileOutputStream out4=new FileOutputStream("D:\\ready\\1.txt",true);
            BufferedOutputStream out5=new BufferedOutputStream(new FileOutputStream(new File("D:\\ready\\1.txt")));
            BufferedOutputStream out6=new BufferedOutputStream(new FileOutputStream(new File("D:\\ready\\1.txt"),true));
            BufferedOutputStream out7=new BufferedOutputStream(new FileOutputStream("D:\\ready\\1.txt"));
            BufferedOutputStream out8=new BufferedOutputStream(new FileOutputStream("D:\\ready\\1.txt",true));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
